package com.numberone.web.controller.bottomurlson;

import java.util.List;

import com.numberone.system.util.JsonResult;
import org.apache.shiro.authz.annotation.RequiresPermissions;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.*;
import com.numberone.common.annotation.Log;
import com.numberone.common.enums.BusinessType;
import com.numberone.system.domain.BottomUrlSon;
import com.numberone.system.service.IBottomUrlSonService;
import com.numberone.framework.web.base.BaseController;
import com.numberone.common.page.TableDataInfo;
import com.numberone.common.base.AjaxResult;
import com.numberone.common.utils.poi.ExcelUtil;

/**
 * 底部url地址导航栏子级 信息操作处理
 * 
 * @author numberone
 * @date 2020-09-25
 */
@RestController
@RequestMapping("/api/bottomUrlSon")
public class BottomUrlSonApiController extends BaseController
{

	@Autowired
	private IBottomUrlSonService bottomUrlSonService;


	/**
	 * 根据父级id查询对应子id的数据
	 * @param pid
	 * @return
	 */
	@GetMapping("/get")
	public  Object getBottomUrlSon(Long pid){
		List<BottomUrlSon>  bottomUrlSons =	bottomUrlSonService.selectByPid(pid);

		if (bottomUrlSons.isEmpty()){
			return JsonResult.nodata();
		}
		return  JsonResult.success(bottomUrlSons);
	}
	
}
